package cn.smileyan.demos.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 单个结点 cpu数据项
 * @author smileyan
 */
@Data
@NoArgsConstructor
public class CpuDataItem {
    /**
     * 节点id
     */
    private String itemId;

    /**
     * 时间戳
     */
    private Long timestamp;

    /**
     * 对应的值
     */
    private Double value;

    public CpuDataItem(TaskInput task) {
        this.itemId = task.getItemId();
        this.timestamp = task.getData().getTimestamp();
        this.value = task.getData().getValue();
    }
}
